package com.ruoyi.system.api.factory;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.RemoteQYMessageService;
import com.ruoyi.system.api.model.LoginUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;

/**
 * 企业微信登录服务降级处理
 *
 * @author ruoyi
 */
@Component
public class RemoteQYMessageFallbackFactory implements FallbackFactory<RemoteQYMessageService>
{
    private static final Logger log = LoggerFactory.getLogger(RemoteQYMessageFallbackFactory.class);

    @Override
    public RemoteQYMessageService create(Throwable throwable)
    {
        log.error("企业微信消息服务调用失败:{}", throwable.getMessage());
        return new RemoteQYMessageService()
        {


            @Override
            public String send(HashMap<String, Object> map) {
                return null;
            }

            @Override
            public String send_text(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_room_at(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_voice(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_location(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_image(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_file(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_video(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_big_video(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_gif(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_gif_url(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_personal_card(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_link(HashMap<String, Object> map) {
                return null;
            }

            @Override
            public String send_weapp(HashMap<String, Object> map) {
                return null;
            }

            @Override
            public String send_feed_video(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String apply_voice_id(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String query_voice_text(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String confirm_msg(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String revoke_msg(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String report_unread(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_forward_msg(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_feed_live(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_quote_msg(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }

            @Override
            public String send_finder_product(HashMap<String, List<HashMap<String, Object>>> map) {
                return null;
            }
        };
    }
}
